<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <!-- MOTW-DISABLED saved from url=(0014)about:internet -->
    <title>Formatter</title>
    <link rel="StyleSheet" href="css/ScriptingReference.css" type="text/css" media="all" />
    <link rel="StyleSheet" href="css/webworks.css" type="text/css" media="all" />
    <link rel="StyleSheet" href="webworks.css" type="text/css" media="all" />
    <script type="text/javascript" language="JavaScript1.2">
      <!--
        var  WebWorksRootPath = "";
      // -->
    </script>
  </head>
  <body>
    <div style="text-align: left;">
      <table cellspacing="0" summary="">
        <tr>
          <td>
            <a href="ScriptingReference.24.8.html"><img src="images/prev.gif" alt="Previous" border="0" /></a>
          </td>
          <td>
            <img src="images/nextx.gif" alt="Next" border="0" />
          </td>
        </tr>
      </table>
    </div>
    <hr align="left" />
    <blockquote>
      <h2 class="RH1_Class">Class  <a name="334584">Formatter </a></h2>
      <p class="b_Body"><a name="356394">The Formatter class is a BIRT-provided JavaScript class that provides one static function to retrieve a formatted string from an object using any of the set String Format pattern values. These values are identical to the XML pattern markup for data type format values defined in Properties.</a></p>
      <h3 class="RH2_Method"><a name="356395">Formatter.format </a></h3>
      <p class="b_Body"><a name="356398">This function returns a formatted string derived from the input object</a></p>
      <p class="N_sb_ScanBold"><a name="334605">Syntax</a></p>
      <div class="rs_RSyntax"><a name="334606">string format(object value, string pattern)</a></div>
      <p class="N_sb_ScanBold"><a name="334607">Parameters</a></p>
      <p class="RParameter"><a name="334609">value</a></p>
      <p class="bn_BodyNoLead"><a name="334610">Object. The data to format into a patterned string.</a></p>
      <p class="RParameter"><a name="334612">pattern</a></p>
      <p class="bn_BodyNoLead"><a name="334613">String. The validvalues include:</a></p>
      <div class="b1_Bullet1_outer" style="margin-left: 0pt">
        <table border="0" cellspacing="0" cellpadding="0" summary="" role="presentation">
          <tr style="vertical-align: baseline">
            <td>
              <div class="b1_Bullet1_inner" style="width: 14.1732283464567pt; white-space: nowrap">
                <img src="Bullet.png" alt="*" border="0" width="6" height="6" />
              </div>
            </td>
            <td width="100%">
              <div class="b1_Bullet1_inner"><a name="351075">&gt; for uppercase</a></div>
            </td>
          </tr>
        </table>
      </div>
      <div class="b1_Bullet1_outer" style="margin-left: 0pt">
        <table border="0" cellspacing="0" cellpadding="0" summary="" role="presentation">
          <tr style="vertical-align: baseline">
            <td>
              <div class="b1_Bullet1_inner" style="width: 14.1732283464567pt; white-space: nowrap">
                <img src="Bullet.png" alt="*" border="0" width="6" height="6" />
              </div>
            </td>
            <td width="100%">
              <div class="b1_Bullet1_inner"><a name="351085">&lt; for lowercase</a></div>
            </td>
          </tr>
        </table>
      </div>
      <div class="b1_Bullet1_outer" style="margin-left: 0pt">
        <table border="0" cellspacing="0" cellpadding="0" summary="" role="presentation">
          <tr style="vertical-align: baseline">
            <td>
              <div class="b1_Bullet1_inner" style="width: 14.1732283464567pt; white-space: nowrap">
                <img src="Bullet.png" alt="*" border="0" width="6" height="6" />
              </div>
            </td>
            <td width="100%">
              <div class="b1_Bullet1_inner"><a name="351097">^ to preserve leading white space</a></div>
            </td>
          </tr>
        </table>
      </div>
      <div class="b1_Bullet1_outer" style="margin-left: 0pt">
        <table border="0" cellspacing="0" cellpadding="0" summary="" role="presentation">
          <tr style="vertical-align: baseline">
            <td>
              <div class="b1_Bullet1_inner" style="width: 14.1732283464567pt; white-space: nowrap">
                <img src="Bullet.png" alt="*" border="0" width="6" height="6" />
              </div>
            </td>
            <td width="100%">
              <div class="b1_Bullet1_inner"><a name="351127">Custom combinations of characters and the @ wildcard for the right-aligned character, such as @@@@@-@@@@ for zip+4.</a></div>
            </td>
          </tr>
        </table>
      </div>
      <p class="N_sb_ScanBold"><a name="334995">Returns</a></p>
      <p class="b_Body"><a name="334996">String. The formatted string.</a></p>
      <p class="N_sb_ScanBold"><a name="334620">Example</a></p>
      <p class="b_Body"><a name="334621">The following example returns the uppercase values for the customer’s last name: </a></p>
      <div class="cf_CodeFirst"><a name="334622">Formatter.format(dataSetRow["CONTACTLASTNAME"], '&gt;')</a></div>
    </blockquote>
    <hr align="left" />
    <table align="right" summary="">
      <tr>
        <td class="WebWorks_Company_Name_Bottom">
          <a href="notices.html">(c) Copyright Actuate Corporation 2013</a>
        </td>
      </tr>
    </table>
  </body>
</html>